var mysql = require('mysql');
var config = require('../config');
var pool = mysql.createPool(config.mysqlConfig);

module.exports.poolSelectOne = function(query, callback){
	pool.getConnection(function(err,Connection){
		if (err) {
			console.log(err);
		} else {
			Connection.query(query, function(err, row){
				if (err) {
					console.log(err);
				} else {
					Connection.release();
					callback(err,row);
				}
			});
		}
	});
}
